﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.CodeDom;

namespace Perovich.GameObjects.Tools.Util
{
    public class AutoPropertyInitializer
    {
        private string name;
        private string type;
        private CodeExpression value;

        public CodeStatement Init
        {
            get
            {
                return new CodeAssignStatement(new CodePropertyReferenceExpression(new CodeThisReferenceExpression(), name), value);
            }
        }

        public AutoPropertyInitializer(string name, string type, CodeExpression value)
        {
            this.name = name;
            this.type = type;
            this.value = value;
        }

    }
}
